#include"../level.hpp"

void test_level(const char* level)
{
    printf("------------level:%s------------\r\n",level);
    DBG_LOG("log_level:debug\r\n");
    INF_LOG("log_level:info\r\n");
    WAR_LOG("log_level:warning\r\n");
    ERR_LOG("log_level:error\r\n");
    printf("\r\n");
}

int main()
{
    std::ostringstream oss;
    std::string tid=tid_to_str(std::this_thread::get_id());
    INF_LOG("this is:%s\n",tid.c_str());

    set_level(DBG_LEVEL);
    test_level("debug");

    set_level(INF_LEVEL);
    test_level("info");

    set_level(WAR_LEVEL);
    test_level("warning");

    set_level(ERR_LEVEL);
    test_level("error");

    return 0;
}